<?php
/**
 * 此文件是一个类的模板
 * 其中c表示相应的命名空间
 * comm表示类的名字
 */
namespace c;
class index extends \i{
    private static $_i;
    public $db;
    public static function i($pars=[]){
        self::$_i or self::$_i=new \c\index($pars);
        return self::$_i;
    }
    public function __construct($pars=[]){
        parent::__construct($pars);
//        $this->db=\lib\db::i(\i::cfg('db'));  //数据库连接
    }
    public function index()
    {
        $vd=[
            'active_nav'=>0,
        ];
        self::v(['comm/header','comm/topbar',"index/index",'comm/botbar','comm/bottom'],$vd);
    }

    public function page_quickstart()
    {
        $vd=[
            'active_nav'=>1,
        ];
        self::v(['comm/header','comm/topbar',"page/quickstart",'comm/botbar','comm/bottom'],$vd);
    }

    public function page_doc()
    {

        $vd=[
            'active_nav'=>2,
        ];
        self::v(['comm/header','comm/topbar',"page/doc",'comm/botbar','comm/bottom'],$vd);
    }
    public function page_about()
    {

        $vd=[
            'active_nav'=>3,
        ];
        self::v(['comm/header','comm/topbar',"page/about",'comm/botbar','comm/bottom'],$vd);
    }
}